Nowadays, positioning systems such as Global Positioning System (GPS) have been widely used in various terminal devices equipped with functions of positioning. When positioning, a GPS function samples data periodically, and records latitude, longitude and an altitude of a terminal device at the time of sampling. Usually, the GPS function samples data with a predetermined rate, i.e., the GPS function samples data with a fixed sampling rate. However, the terminal device has high power consumption when using the GPS function. If the GPS function of the terminal device is switched on at all times, i.e., the GPS function is running even though a position of the terminal device is not changed, the power of the terminal device may be exhausted in a short period of time. As a result, a user cannot use the terminal device, causing inconvenience.